package com.miracle.system.mapper;

import com.miracle.system.domain.SysResource;
import com.miracle.system.domain.SysRoleResource;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @author ：miracle.cui
 * @description：TODO
 * @date ：2020/8/18 11:19
 */
public interface SysRoleResourceMapper {

    public Integer batchInsertRoleResource(List<SysRoleResource> roleResources);

    public Integer deleteRoleResourceByRoleIds(Integer[] roleIds);
    public Integer deleteRoleResourceByResourceIds(Integer[] resourceIds);

    public Integer deleteRoleResourceByRoleIdAndNoResource(@Param("roleId") Integer roleId,
                                                           @Param("resourceList") List<SysResource> resourceList);
}
